class GiftModel {
  int code;
  String msg;
  List<GiftData> data;

  GiftModel({this.code, this.msg, this.data});

  GiftModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    msg = json['msg'];
    if (json['data'] != null) {
      data = new List<GiftData>();
      json['data'].forEach((v) {
        data.add(new GiftData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['msg'] = this.msg;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class GiftData {
  int id;
  String giftName;
  int giftPrice;
  String giftImgUrl;

  GiftData({this.id, this.giftName, this.giftPrice, this.giftImgUrl});

  GiftData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    giftName = json['giftName'];
    giftPrice = json['giftPrice'];
    giftImgUrl = json['giftImgUrl'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['giftName'] = this.giftName;
    data['giftPrice'] = this.giftPrice;
    data['giftImgUrl'] = this.giftImgUrl;
    return data;
  }
}
